﻿
using System;
using YunZuan.Models.Attributes;
using YunZuan.Models.Entities;

namespace YunZuan.Models
{
    [Table(TableName = "yz_syssetting", PrimaryKey = "SysSettingID")]
    public class SysSettingInfo : BaseEntity
    {
        #region Private Properties
        private int? _sysSettingID;//1 裸钻全局退点 2 统包全局倍率
        private decimal? _rate;
        private decimal? _purchaseExchangerate;
        private decimal? _globalDiscountReturn;
        private decimal? _globalFancyDiscountReturn;
        private string _notice;//备注
        private DateTime? _updateTime;
        private int currentSet;  //币种设置，0为全部，1 为人民币，2为美金
        private string group4C;       //4c规则 白
        private string groupFancy4C; //4c规则 彩
        private string groupAmount; //金额规则
        private int? decimals;  //小数点显示几位
        private string filterFields; //产品对应过滤显示的字段
        #endregion

        #region Public Properties
        /// <summary>
        /// SysSettingID.
        /// </summary>
        [Column(IsAutoIncrement = true)]
        public int? SysSettingID
        {
            get
            {
                return _sysSettingID;
            }
            set
            {
                this.ChangeNotify<int?>("SysSettingID", value, ref _sysSettingID);
            }
        }
        public int CurrentSet
        {
            get
            {
                return currentSet;
            }
            set
            {
                this.ChangeNotify<int>("CurrentSet", value, ref currentSet);
            }
        }
        /// <summary>
        /// Rate.
        /// </summary>
        public decimal? Rate
        {
            get
            {
                return _rate;
            }
            set
            {
                this.ChangeNotify<decimal?>("Rate", value, ref _rate);
            }
        }
          /// <summary>
        /// PurchaseExchangerate.
        /// </summary>
        public decimal? PurchaseExchangerate
        {
            get
            {
                return _purchaseExchangerate;
            }
            set
            {
                this.ChangeNotify<decimal?>("PurchaseExchangerate", value, ref _purchaseExchangerate);
            }
        }

        /// <summary>
        /// GlobalDiscountReturn.全局白钻折扣
        /// </summary>
        public decimal? GlobalDiscountReturn
        {
            get
            {
                return _globalDiscountReturn;
            }
            set
            {
                this.ChangeNotify<decimal?>("GlobalDiscountReturn", value, ref _globalDiscountReturn);
            }
        }

        /// <summary>
        /// GlobalFancyDiscountReturn.全局彩钻折扣
        /// </summary>
        public decimal? GlobalFancyDiscountReturn
        {
            get
            {
                return _globalFancyDiscountReturn;
            }
            set
            {
                this.ChangeNotify<decimal?>("GlobalFancyDiscountReturn", value, ref _globalFancyDiscountReturn);
            }
        }

        /// <summary>
        /// Notice
        /// </summary>
        public string Notice
        {
            get
            {
                return _notice;
            }
            set
            {
                this.ChangeNotify<string>("Notice", value, ref _notice);
            }
        }

        /// <summary>
        /// UpdateTime.
        /// </summary>
        public DateTime? UpdateTime
        {
            get
            {
                return _updateTime;
            }
            set
            {
                this.ChangeNotify<DateTime?>("UpdateTime", value, ref _updateTime);
            }
        }
        /// <summary>
        /// Group4C
        /// </summary>
        public string Group4C
        {
            get
            {
                return group4C;
            }
            set
            {
                this.ChangeNotify<string>("Group4C", value, ref group4C);
            }
        }

        /// <summary>
        /// GroupFancy4C
        /// </summary>
        public string GroupFancy4C
        {
            get
            {
                return groupFancy4C;
            }
            set
            {
                this.ChangeNotify<string>("GroupFancy4C", value, ref groupFancy4C);
            }
        }
        /// <summary>
        /// GroupAmount
        /// </summary>
        public string GroupAmount
        {
            get
            {
                return groupAmount;
            }
            set
            {
                this.ChangeNotify<string>("GroupAmount", value, ref groupAmount);
            }
        }

        /// <summary>
        /// 小数点 接口序列化为point，用原有DataStatus
        /// </summary>
        public int? Decimals
        {
            get
            {
                if (decimals == null)
                    decimals = 2;
                return decimals;
            }
            set
            {
                this.ChangeNotify<int?>("Decimals", value, ref decimals);
            }
        }  
        /// <summary>
        /// 小数点 接口序列化为point，用原有DataStatus
 
        public string FilterFields
        {
            get 
            {  
                return filterFields;
            }
            set
            {
                this.ChangeNotify<string>("FilterFields", value, ref filterFields);
            }
        }
        #endregion
    }
}
